package com.spider.util;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@Configuration //用于标注该类是一个配置类
@EnableScheduling //是否开启定时任务
public class StaticScheduleTask {

    @Scheduled(cron = "0/5 5 0/5 31 * ?")
    /*                  秒 分 时 日月周几

     */
    public void testingTask(){
        System.out.println("每隔5秒运行一次");
    }
}
